<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Results</title>
	<meta charset="utf-8"></meta>
	<!-- Viewport image scale for the mobile phone initial scale set to 1 -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
	<meta name="description" content="Descrizione Prova"></meta>
	<meta name="keywords" content="Chiavi Prova"></meta>
	<meta name="author" content="Nome del Gruppo"></meta>
	<!-- CSS Class Region -->
	<link rel="stylesheet" href="css/bootstrap.css"></link>
	<link rel="stylesheet" href="css/style.css"></link>
	<link rel="stylesheet" href="fonts/font-awesome.css"></link>
	<!-- JS Class Region -->
	<script src="js/jquery.js"></script>	
	<script src="js/jquery.mobilemenu.js"></script>
	<!--[if lt IE 9]>
    <div style='text-align:center'><a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></img></a></div>  
  <![endif]-->
	<!-- Display dell'errore di HTML5 Responsive non supportato -->
	<!--[if lt IE 9]><script src="../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

	<!-- HTML5 shim and Respond.js IE8 supporto per HTML5 -->
	<!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    
    
  <![endif]-->
</h:head>
<body>
	<!--header-->
	<header>
	<div class="container">
		<div class="row">
			<article class="col-lg-12 col-md-12 col-sm-12">
			<div class="home_div_src">
				<div align="center">

					<h:form>
						<table style="width: 100%">
							<tr>
								<td COLSPAN="4" align="center"><a href="main.xhtml"><img
										src="img/logo.png" alt="" style="padding-top: 2px"></img></a></td>
							</tr>
							<tr>
								<td style="width: 90%"><h:inputText
										value="#{mainBean.queryString}" class="textbox"
										style="width: 100%"></h:inputText></td>
								<td>&nbsp;</td>
								<td style="width: 5%"><h:commandButton value="Submit Query"
										action="results" class="search_button"></h:commandButton></td>
								<td style="width: 5%"><h:commandButton
										value="Images Search" action="imageResults"
										class="search_button"></h:commandButton></td>
								<td style="width: 5%"><h:commandButton value="Cube"
										action="cubo" class="search_button"></h:commandButton></td>
							</tr>
						</table>
					</h:form>
				</div>
			</div>
			</article>
		</div>
	</div>
	</header>
	<div class="global indent">
		<!--content-->
		<div class="container">
			<div class="row">
				<article class="col-lg-12 col-md-12 col-sm-12 privacyBox">
				<ul class="list8">

					#{mainBean.search()}
					<h:outputLabel
						rendered="#{mainBean.result.originalQuery != mainBean.result.collatedQuery}">
						<div>
							<h3>
								Maybe you mean... <i><h:outputLabel
										value="#{mainBean.result.collatedQuery}"></h:outputLabel></i>
							</h3>

							<h:form>
								<h3>
									Instead you want to search exactly:
									<h:commandLink value="#{mainBean.result.originalQuery}"
										action="resultsWithoutSuggestions"></h:commandLink>
								</h3>
							</h:form>

						</div>
					</h:outputLabel>
					<h2>
						Results for the query <i><h:outputLabel
								value="#{mainBean.result.collatedQuery}"></h:outputLabel></i>
					</h2>
					<p:dataTable value="#{mainBean.result.docs}" var="doc"
						paginator="true" rows="10"
						paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						rowsPerPageTemplate="5,10,15">
						<p:column>
							<div class="box effect6">
								<h3><a href="file://#{doc.id}">#{doc.title}</a></h3>
								<p class="smart_link">
									<a href="file://#{doc.id}">#{doc.id}</a>
								</p>
								<p class="snippet_class">#{doc.getSnippet()}</p>
							</div>							
						</p:column>
						<p:column>
								<script src="js/snippet.js"></script>	 			
						</p:column>						
						</p:dataTable>

					<h:outputLabel rendered="#{empty mainBean.result.docs}">
						<h3>NOTHING FOUND! Try another search</h3>
					</h:outputLabel>
				</ul>
				</article>
			</div>
		</div>
	</div>
	
									
	<!--footer-->
	<footer>
	<div class="container">
		<div class="row">
			<article class="col-lg-12 col-md-12 col-sm-12">
			<p>
				<span>Francesco Elefante, Roberto Fenaroli, Roberto Manca,
					Giovanni Pace</span>
			</p>
			<ul>
				<li><a href="#"><img src="img/follow_icon1.png" alt=""></img></a></li>
				<li><a href="#"><img src="img/follow_icon2.png" alt=""></img></a></li>
				<li><a href="#"><img src="img/follow_icon4.png" alt=""></img></a></li>
			</ul>
			</article>
		</div>
	</div>
	</footer>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/tm-scripts.js"></script>
</body>
</html>
